//
//  TTAPI+Common.swift
//  TTBLL
//
//  Created by Toj on 5/11/21.
//

import Foundation

extension TTAPIRequest.API {
    // 刷新token
    static var refreshToken: TTAPIRequest.API {
        return TTAPIRequest.API(rawValue: "/user/encry")
    }
    
    // oss参数
    static var ossConfig: TTAPIRequest.API {
        return TTAPIRequest.API(rawValue: "/vts_v1/config/getOssConfig")
    }
}

extension TTAPI.Request {
    
    static func refreshToken(completion:((_ response:TTResponse<String>)->())?) {
        
        general(api: .refreshToken, model: String.self, completion: completion)
    }
    
    static func oss(completion:((_ response:TTResponse<String>)->())?) {
        
        general(api: .ossConfig, model: String.self, completion: completion)
    }
}
